//Saturday, December 19 2009
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <math.h>
#include <sstream>
#include <algorithm>

using namespace std;

class MaximalProduct
{
public:
	long long maximalProduct(int s, int k)
	{
		int N = s / k;
		int num = s % k;
		cout << N << ", " << num << endl;
		long long ret = 1;
		for(int i=0; i<k-num; i++)
			ret *= N;
		for(int i=0; i<num; i++)
			ret *= N+1;
		return ret;
	}
};
